package org.credo.wsdl.cxf2;

import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.soap.SOAPBinding;

/**
 * <p>Description:未能成功访问. </p>
 * @author <a href="zhaoqianjava@qq.com">Credo</a>
 */
public class HelloWorldClient {
	
	private static final QName SERVICE_NAME= new QName("http://server.ws.demo/",  "HelloWorld");
	private static final QName PORT_NAME = new QName("http://server.ws.demo/", "HelloWorldPort");
	
	public static void main(String[] args) {
		Service service=Service.create(SERVICE_NAME);
		String endpointAddress = "http://localhost:9000/helloWorld";
		service.addPort(PORT_NAME, SOAPBinding.SOAP11HTTP_BINDING, endpointAddress);
		HelloWorld hw = service.getPort(HelloWorld.class);
        System.out.println(hw.sayHi("World"));
	}

}
